package com.jkc.xh.adapters.viewholder;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.jkc.xh.R;
import com.jkc.xh.models.RefferFriendModel;
import com.jkc.xh.utils.Tool;

import org.androidannotations.annotations.EViewGroup;
import org.androidannotations.annotations.ViewById;

/**
 */
@EViewGroup(R.layout.item_reffer_friend)
public class RefferFriendItemView extends RelativeLayout {

    @ViewById
    TextView user_name;
    @ViewById
    TextView mobile;
    @ViewById
    TextView bean_money;
    @ViewById
    TextView score;
    @ViewById
    TextView create_time;
    @ViewById
    TextView total_buss_money;
    @ViewById
    TextView total_month_money;

    public RefferFriendItemView(Context context) {
        super(context);
    }

    public RefferFriendItemView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public void bind(RefferFriendModel model) {
        user_name.setText(model.user_name);
        mobile.setText(model.mobile);
        total_buss_money.setText(model.total_buss_money);
        total_month_money.setText(model.total_month_money);
        mobile.setText(model.mobile);
        bean_money.setText(Tool.formatNumNoScale(model.bean_money));
        score.setText(Tool.formatNumNoScale(model.score));
        create_time.setText(Tool.formatSecondSimpleFullDate(model.create_time));
    }


}
